package com.jeesite.modules.vehicle.entity;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Table(name="h_brand", alias="a", label="品牌信息", columns={
        @Column(name="brand_id", attrName="brandId", label="id", isPK=true),
        @Column(name="title", attrName="title", label="名称", queryType= QueryType.LIKE),
        @Column(name="logo", attrName="logo", label="logo"),
        @Column(name="type", attrName="type", label="类型", comment="0:摩托车  1:汽车"),
        @Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
        @Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
        @Column(name="update_by", attrName="updateBy", label="更新者"),
        @Column(name="update_date", attrName="updateDate", label="更新时间"),
        @Column(name="remarks", attrName="remarks", label="备注"),
}, orderBy="a.create_date DESC"
)
public class BrandApi extends DataEntity<BrandApi> {

    private static final long serialVersionUID = 1L;
    private String brandId;  // 品牌id
    private String title;  // 名称
    private String logo;  // 头像
    private String type;  // 类型
    private Integer limitSize; // 条数

    public String getBrandId() {
        return brandId;
    }

    public void setBrandId(String brandId) {
        this.brandId = brandId;
    }

    @NotBlank(message="品牌不能为空")
    @Size(min=0, max=64, message="品牌长度不能超过 64 个字符")
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Size(min=0, max=128, message="品牌logo长度不能超过 128 个字符")
    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getLimitSize() {
        return limitSize;
    }

    public void setLimitSize(Integer limitSize) {
        this.limitSize = limitSize;
    }
}
